<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateWorksTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('works', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('pid');                  //pid 和user_personnels表关联
            $table->integer('uid');                  //用户id
            $table->string('company',50);     //公司名称
            $table->string('industry',50);    //公司行业
            $table->string('job_title',50);   //职位名称
            $table->string('start_time',20);  //开始时间
            $table->string('over_time',20);   //结束时间
            $table->text('performance')->nullable();  //业绩
            $table->string('report',50)->nullable();      //汇报对象
            $table->integer('subordinate_number')->default(0);//下属人数
            $table->string('nianxin',20)->nullable();//年薪
            $table->string('nature')->nullable();//公司性质
            $table->string('scale')->nullable();//公司规模
            $table->string('department')->nullable();//所在部门
            $table->string('company_introduction',1000)->nullable();//公司介绍
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('works');
    }
}
